Efficiently searching and modifying a variable length queue

ABSTRACT

A system for ensuring that serialization is maintained between separate transactions while searching and/or modifying a variable length queue is system includes a computer processor and logic executable by the computer processor. The logic is configured to implement a method. The method includes searching, by a processing device, a queue using a transaction. A first sequence number is retrieved from a queue header and a second sequence number is retrieved from local storage for the transaction. The first sequence number is compared with the second sequence number according to embodiments. The search of the queue is resumed using an address of a next element saved from a previous transaction responsive to the first sequence number matching the second sequence number. The search of the queue is restarted at a first element responsive to the first sequence number not matching the second sequence number.

BACKGROUND

The present invention relates generally to the serialization of queuesin a multi-processor environment, and more specifically, to ensuringthat serialization is maintained between separate transactions whilesearching and/or modifying a variable length queue.

Searching and/or modifying a queue in a multi-processor environmentgenerally requires a serialization mechanism to ensure that one centralprocessing unit (CPU) is not making incompatible changes to the queuewhile another CPU is either searching the queue or also making changesto the queue.

One conventional serialization mechanism is a hardware or softwarelocking technique, which permits a single CPU to update the queue ormultiple CPUs to search the queue without updating. Another conventionalserial mechanism utilizes transactional execution. A typicaltransactional execution implementation allows a set of instructions thatsearch or modify a queue to appear as a single transaction with respectto other CPUs. That is, all storage accesses between the start and endof the transaction appear to be block-concurrent with respect to otherCPUs, and all storage updates are either committed in their entiretyonce the transaction ends or none of them are committed due to a fetchor store conflict with another CPU. If a conflict occurs between twoCPUs (e.g., one CPU accesses a storage area that is modified byanother), the transaction is aborted for one or both CPUs. Thetransaction can then be retried by the CPUs.

SUMMARY

According to an embodiment of the present invention, a method forensuring that serialization is maintained between separate transactionswhile searching and/or modifying a variable length queue is provided.The method includes searching, by a processing device, a queue using atransaction. A first sequence number is retrieved from a queue headerand a second sequence number is retrieved from local storage for thetransaction. The first sequence number is compared with the secondsequence number according to embodiments. The search of the queue isresumed using an address of a next element saved from a previoustransaction responsive to the first sequence number matching the secondsequence number. The search of the queue is restarted at a first elementresponsive to the first sequence number not matching the second sequencenumber.

According to an embodiment of the present invention, a system forensuring that serialization is maintained between separate transactionswhile searching and/or modifying a variable length queue is provided.The system includes a computer processor and logic executable by thecomputer processor. The logic is configured to implement a method. Themethod includes searching, by a processing device, a queue using atransaction. A first sequence number is retrieved from a queue headerand a second sequence number is retrieved from local storage for thetransaction. The first sequence number is compared with the secondsequence number according to embodiments. The search of the queue isresumed using an address of a next element saved from a previoustransaction responsive to the first sequence number matching the secondsequence number. The search of the queue is restarted at a first elementresponsive to the first sequence number not matching the second sequencenumber.

According to a further embodiment of the present invention, a computerprogram product for ensuring that serialization is maintained betweenseparate transactions while searching and/or modifying a variable lengthqueue is provided. The computer program product includes a storagemedium having computer-readable program code embodied thereon, whichwhen executed by a computer processor, causes the computer processor toimplement a method. The method includes searching, by a processingdevice, a queue using a transaction. A first sequence number isretrieved from a queue header and a second sequence number is retrievedfrom local storage for the transaction. The first sequence number iscompared with the second sequence number according to embodiments. Thesearch of the queue is resumed using an address of a next element savedfrom a previous transaction responsive to the first sequence numbermatching the second sequence number. The search of the queue isrestarted at a first element responsive to the first sequence number notmatching the second sequence number.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with theadvantages and the features, refer to the description and to thedrawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1 depicts a block diagram of a computer system according to anembodiment;

FIG. 2 depicts a flow diagram of a process for searching and modifying avariable length queue with a transaction according to an embodiment; and

FIG. 3 depicts a flow diagram a process for resuming the searching andmodifying of a variable length queue with a new transaction according toan embodiment.

DETAILED DESCRIPTION

Embodiments disclosed herein are directed to a method providingtransactional execution to search and/or modify a variable length queuesuch that the number of elements searched does not cause the maximumnumber of storage references to be exceeded and the transaction to beaborted, and ensures serialization is maintained between separatetransactions. Embodiments disclosed herein may provide a hardware orsoftware lock as a backup if the transaction aborts and cannot beretried and ensures that all transactions are aborted if another CPUobtains a lock for serialization.

Searching and modifying a queue in a multi-processor environmentgenerally requires a serialization mechanism to ensure that one centralprocessing unit (CPU) is not making incompatible changes to the queuewhile another CPU is either searching the queue or also making changesto the queue. In typical multi-processing environments, serializationmay be accomplished by a hardware or software locking technique, whichpermits a single CPU to update the queue or multiple CPUs to search thequeue without updating. This technique typically serializes a muchbroader resource that what is necessary. For example, if a queueconsists of 1000 elements, and one CPU needs to add an element betweenthe 999th and 1000th elements, and a second CPU needs to search thequeue for a matching element that appears before the 999th element, thenthe second CPU must still wait even though it is not affected by thechanges made by the first CPU. Finer grained serialization such as usingmultiple locks may be used, however, multiple locks may have hierarchyor dead-lock issues and may not lend itself easily to the way the queueis being accessed.

Transactional execution allows the set of instructions that search ormodify a queue to appear as a single transaction with respect to otherCPUs. That is, all storage accesses between the start and end of thetransaction appear to be block-concurrent with respect to other CPUs,and all storage updates are either committed in their entirety once thetransaction ends, or none of them are committed due to fetch or storeconflict with another CPU. If a conflict occurs between two CPUs (e.g.,one CPU accesses a storage area that is modified by another), thetransaction is aborted for one or both CPUs. The transaction may then beretried by the CPUs. However, even with transactional execution, thereare limitations on the number of unique storage references and updates(e.g., cache lines) that can occur within a transaction, and limitationson the type or number of instructions that may be executed. For example,a program may need to find and remove two elements from the queue. Aftereach element is removed, some additional processing needs to beperformed, such as freeing the element or giving control to anotherroutine. If this additional processing cannot be done under atransaction, then the program has no choice but to end the transactionafter finding the first element and then start a new transaction for thesecond element. Since there is no serialization between thetransactions, the program has no choice but to search the queue startingwith the first element. If the queue is very long, this can be very timeconsuming, especially if storage areas for the elements are no longer inthe CPU cache and have to be fetched from memory. Additionally, if thereare limitations on the number of unique storage references in atransaction, the program cannot simply search through the entire queueuntil it finds the matching element because the transaction would abortlong before the element is found.

Embodiments disclosed herein provide a method, system, and computerprogram product for maintaining serialization between separatetransactions. A new transaction may resume a search of a queue accordingto embodiments. The new transaction retrieves a first sequence numberfrom a queue header a second sequence number for the transaction fromlocal storage. The first sequence number is compared with the secondsequence number according to embodiments. Responsive to the firstsequence number matching the second sequence number, the search of thequeue is resumed using an address of a next element saved from aprevious transaction. However, responsive to the first sequence numbernot matching the second sequence number, a search of the queue isrestarted at a first element of the queue.

Referring now to FIG. 1, a block diagram of a computer system 10suitable for searching and modifying a variable length queue withoutlocks according to exemplary embodiments is shown. Computer system 10 isonly one example of a computer system and is not intended to suggest anylimitation as to the scope of use or functionality of embodimentsdescribed herein. Regardless, computer system 10 is capable of beingimplemented and/or performing any of the functionality set forthhereinabove.

Computer system 10 is operational with numerous other general purpose orspecial purpose computing system environments or configurations.Examples of well-known computing systems, environments, and/orconfigurations that may be suitable for use with computer system 10include, but are not limited to, personal computer systems, servercomputer systems, thin clients, thick clients, cellular telephones,handheld or laptop devices, multiprocessor systems, microprocessor-basedsystems, set top boxes, programmable consumer electronics, network PCs,minicomputer systems, mainframe computer systems, and distributed cloudcomputing environments that include any of the above systems or devices,and the like.

Computer system 10 may be described in the general context of computersystem-executable instructions, such as program modules, being executedby the computer system 10. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system 10 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed computing environment, program modules may be located inboth local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1, computer system 10 is shown in the form of ageneral-purpose computing device, also referred to as a processingdevice. The components of computer system may include, but are notlimited to, one or more processors or processing units 16, a systemmemory 28, and a bus 18 that couples various system components includingsystem memory 28 to processor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnects (PCI) bus.

Computer system 10 may include a variety of computer system readablemedia. Such media may be any available media that is accessible bycomputer system/server 10, and it includes both volatile andnon-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system 10 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the disclosure.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system 10 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 10; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 10 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 22. Still yet, computer system 10 can communicate withone or more networks such as a local area network (LAN), a general widearea network (WAN), and/or a public network (e.g., the Internet) vianetwork adapter 20. As depicted, network adapter 20 communicates withthe other components of computer system 10 via bus 18. It should beunderstood that although not shown, other hardware and/or softwarecomponents could be used in conjunction with computer system 10.Examples include, but are not limited to: microcode, device drivers,redundant processing units, external disk drive arrays, RAID systems,tape drives, and data archival storage systems, etc.

With reference to FIG. 2, a process 200 for searching and modifying avariable length queue with a transaction according to an embodiment isgenerally shown. According to an embodiment the process 200 may beimplemented with a processing unit 16 of computer system 10 shown inFIG. 1.

According to an embodiment, a queue header control block of anembodiment has a pointer to a first element of the queue. The queueheader control block may be stored in system memory according to anembodiment. The queue header control block may be at a fixed location inmemory or may be found by traversing a set of control blocks accordingto an embodiment. The queue header control block contains the firstsequence number, which is incremented any time an element in the queueis added, deleted or modified. The first sequence number is updatedunder a serialization of the transaction or as a backup, a lock.

Before starting the first transaction to search the queue, a secondsequence number variable in a local storage of the processing unit 16 isset to zero. Because the second sequence number is zero, the currentsequence number from the queue header is obtained and the search of thequeue begins with the first element in the queue, as shown in block 210.According to an embodiment, by referencing the first sequence number inthe queue header within the transaction, the current processing unit 16is registering interest in the storage area used for the first sequencenumber. Therefore, if another processing unit successfully adds,removes, or modifies an element from the queue, it will increment thesequence number and cause the current processing unit's transaction toabort.

As shown in block 210, a limited number of elements on the queue aresearched for a matching element to add, remove, or modify according toan embodiment. According to another embodiment, the queue may besearched to copy an element or simply to checking whether a matchingelement exists. The number of storage areas that can be referencedwithin the transaction is limited, so a fixed number of elements will besearched before the transaction is ended (e.g., 100 elements). At block220, the process 200 determines whether a matching element has beenfound during the transaction.

Responsive to finding a matching element at block 220, the process 200determines whether the matching element on the queue has been added,removed, or modified, as shown in block 230. If the matching element onthe queue was added, removed, or modified, the first sequence number inthe queue header is incremented, as shown in block 240. According to anembodiment, the modified first sequence number in the queue header isalso copied as the second sequence number variable in the local storageof the current processing unit, as shown in block 250. Therefore, thesecond sequence number in local storage will be updated when thetransaction ends as discussed further below.

At block 260, a determination is made as to whether the transaction hasmore elements to be processed. Responsive to the transaction having moreelements to process, the transaction may continue to find additionalelements to examine, modify, or delete in the same transaction, as shownin block 210. This is possible as long as the maximum number of storagereferences for the transaction is not exceeded and the transaction doesnot use instructions not supported under transactional execution. Inother words, the transaction may continue searching the queue foradditional elements if the limited number of elements referenced inblock 210 has not been exceeded. However, responsive to the transactionexceeding the limited number of elements referenced in block 210 toprocess, the address of the next element is saved in local storageaccording to an embodiment, as shown in block 270. At block 280, thetransaction is ended, which commits all storage updates including anychanges to the queue header, the local storage sequence numbers, and thelocal address of the next element according to an embodiment.

Responsive to not finding a matching element within the limited numberof elements at block 220, the address of the next element is saved inlocal storage according to an embodiment, as shown in block 270.Accordingly, the transaction is ended, which commits all storage updatesincluding any changes to the queue header, the local storage sequencenumbers, and the local address of the next element according to anembodiment, as shown in block 280.

Responsive to not modifying the matching element at block 230, adetermination is made at block 260 as to whether there are more elementsto process in the transaction. If the limited number of elementsreferenced in block 210 has not been exceeded, the transaction willcontinue to find additional elements to examine, modify, or delete inthe same transaction, as shown in block 210. However, responsive to adetermination that the limited number of elements referenced in block210 has been exceeded at block 260, the address of the next element issaved in local storage according to an embodiment, as shown in block270. Accordingly, the transaction is ended, which commits all storageupdates including any changes to the queue header, the local storagesequence numbers, and the local address of the next element according toan embodiment, as shown in block 280.

With reference to FIG. 3, a process 300 for resuming the searching andmodifying of a variable length queue with a new transaction according toan embodiment is generally shown. According to an embodiment the process300 may be implemented with a processing unit 16 of computer system 10shown in FIG. 1.

At block 310, a search for a matching element within a queue is resumedusing a new transaction. The first sequence number is retrieved from thequeue header, as shown in block 320, and the second sequence number isretrieved from local storage, as shown in block 330. According to anembodiment, the second sequence number in local storage is comparedagainst the first sequence number in the queue header to determinewhether they match, as shown in block 340. If the sequence numbersmatch, then an embodiment will resume searching the queue with theaddress of the next element saved during the previous transaction, asshown in block 350. If another processing unit has modified the queuewhile the current processing unit 16 was outside of the transaction, thesequence number will be different, and an embodiment will resume thesearch starting with the first element, as shown in block 360.

According to an embodiment, if any other processing unit modifies thequeue during the current transaction, then the current transaction willabort for the processing unit 16. If a transaction of an embodimentaborts and is retryable, the maximum number of elements that may besearched at a time may be reduced down to a lower limit and thetransaction may be retried a limited number of times according to anembodiment. For example, a transaction of an embodiment may start bysearching 100 elements and be reduced by 10 each time the transactionaborts down to a lower limit of 50. Reducing the number of elementssearched may increase the likelihood of the transaction completingsuccessfully since it will reduce the interference by other processingunits if there are fetch or store conflicts.

Reducing the number of elements searched by a single transaction mayalso be beneficial when the transaction aborts due to a fetch or storeoverflow condition, meaning the maximum number of storage references orupdates has been exceeded. This condition may be unpredictable in natureand is dependent on the particular processing unit hardwareimplementation. For example, suppose a processing unit supports up to200 cache line references in a transaction, but in certain cases thetransaction may abort with an overflow condition when only 100 cachelines are referenced. This may occur when a processing unit assignscache lines to a congruence class (e.g., a hash bucket) for quick lookup. Therefore, multiple cache lines may map to the same congruenceclass. Each congruence class may hold a maximum number of cache lines.If a new cache line needs to be fetched, and the congruence class isfull, normally an old cache line is cast out to make room. However, fora transactional execution, since all cache lines need to be tracked inorder to complete the transaction, a cast out will cause the transactionto abort. Therefore, the number of elements that may be traversed beforethe transaction abort is variable and unpredictable according to anembodiment.

According to an embodiment, when beginning a new queue search, themaximum number of elements searched by a transaction may be a fixednumber or an adjusted number based on prior transaction attempts. Forexample, if the last time the queue was searched, the transactionaborted until the number of elements was reduced to 70, then subsequentsearches can traverse 70 elements to avoid aborting the new transaction.This number can be increased after a period of time or after significantnumber of elements have been added or removed from the queue accordingto an embodiment.

According to an embodiment, if the transaction is aborted, a limitednumber of designated retries may be performed. When the number ofretries is exhausted or the transaction is aborted and not retryable, alock may be obtained to serialize the queue according to an embodiment.To ensure that all transactions accessing the queue are aborted when thelock is obtained, at the start of each transaction, the contents of thelock word are checked to see if another processing unit has obtained thelock for serialization. If so, a flag is set in local storage toindicate that the lock should be used for serialization, the transactionis ended and the search is retried after obtaining the lock according toan embodiment. If the lock is not held, the transaction continuesaccording to an embodiment. However, by checking the contents of thelock word inside of the transaction, the current processing unit 16 isregistering interest in the storage area used for the lock word.Therefore, if another processing unit obtains the lock after the currenttransaction has checked the lock word, the current transaction will beaborted according to an embodiment.

Technical effects and benefits of embodiments disclosed herein includeproviding a transactional execution to search and/or modify a variablelength queue such that the number of elements searched does not causethe number of storage references to be exceeded and the transaction tobe aborted, and ensuring that serialization is maintained betweenseparate transactions. Embodiments disclosed herein may provide ahardware or software lock as a backup if the transaction aborts andcannot be retried and ensures that all transactions are aborted ifanother CPU obtains a lock for serialization.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the disclosure.As used herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present disclosure has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the disclosure in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the disclosure. Theembodiments were chosen and described in order to best explain theprinciples of the disclosure and the practical application, and toenable others of ordinary skill in the art to understand the disclosurefor various embodiments with various modifications as are suited to theparticular use contemplated.

Further, as will be appreciated by one skilled in the art, aspects ofthe present disclosure may be embodied as a system, method, or computerprogram product. Accordingly, aspects of the present disclosure may takethe form of an entirely hardware embodiment, an entirely softwareembodiment (including firmware, resident software, micro-code, etc.) oran embodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present disclosure may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present disclosure are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of thedisclosure. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

What is claimed is:
 1. A computer system configured to maintainserialization between separate transactions, comprising: a memory havingcomputer readable computer instructions; and a processing device forexecuting the computer readable instructions to perform a methodcomprising: searching a queue using a transaction; retrieving a firstsequence number from a queue header; retrieving a second sequence numberfor the transaction; comparing the first sequence number with the secondsequence number; resuming a search of the queue using an address of anext element saved from a previous transaction responsive to the firstsequence number matching the second sequence number; and starting asearch of the queue at a first element responsive to the first sequencenumber not matching the second sequence number, wherein the transactionis aborted due to a selected one of a group comprising a defined maximumnumber of elements searchable by the transaction is reached, the firstsequence number is incremented by another processing device, a lock isacquired by another processing device, and a fetch and store overflowcondition occurs, wherein the defined maximum number of elementssearchable by the transaction is lowered each time the transactionrestarts due to an abort.
 2. The computer system of claim 1, whereinresponsive to the transaction adding, removing, or modifying an elementin the queue, the system is further configured to: incrementing thefirst sequence number; updating the second sequence number to match theincremented first sequence number; and saving an address of the nextelement in the queue.
 3. The computer system of claim 1, whereinresponsive to the transaction being a first transaction of a queuesearch, the method further comprises setting the second sequence numberto zero before starting the first transaction of the queue search. 4.The computer system of claim 1, wherein the defined maximum number ofqueue elements searchable by the transaction is a fixed number or anadjusted number based on prior transaction attempts.
 5. The computersystem of claim 1, wherein the lock is obtained to serialize the queuein response to reaching a maximum number of transaction restarts.
 6. Acomputer system configured to maintain serialization between separatetransactions, comprising: a memory having computer readable computerinstructions; and a processing device for executing the computerreadable instructions to perform a method comprising: searching a queueusing a transaction; retrieving a first sequence number from a queueheader; retrieving a second sequence number for the transaction;comparing the first sequence number with the second sequence number;resuming a search of the queue using an address of a next element savedfrom a previous transaction responsive to the first sequence numbermatching the second sequence number; and starting a search of the queueat a first element responsive to the first sequence number not matchingthe second sequence number, wherein the transaction is aborted due to aselected one of a group comprising a defined maximum number of elementssearchable by the transaction is reached, the first sequence number isincremented by another processing device, a lock is acquired by anotherprocessing device, and a fetch and store overflow condition occurs,wherein the lock is obtained to serialize the queue in response toreaching a maximum number of transaction restarts.
 7. The computersystem of claim 6, wherein responsive to the transaction adding,removing, or modifying an element in the queue, the system is furtherconfigured to: incrementing the first sequence number; updating thesecond sequence number to match the incremented first sequence number;and saving an address of the next element in the queue.
 8. The computersystem of claim 6, wherein responsive to the transaction being a firsttransaction of a queue search, the method further comprises setting thesecond sequence number to zero before starting the first transaction ofthe queue search.
 9. The computer system of claim 6, wherein the definedmaximum number of elements searchable by the transaction is lowered eachtime the transaction restarts due to an abort.
 10. The computer systemof claim 6, wherein the defined maximum number of queue elementssearchable by the transaction is a fixed number or an adjusted numberbased on prior transaction attempts.